<!DOCTYPE html>
<html>
	<head>
	    <title>用户管理</title>
	    <meta charset="UTF-8">
	    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	    <link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.min.css" />
	    <link rel="stylesheet" type="text/css" href="css/style.css" />
	    <script type="text/javascript" src="js/jquery.min.js"></script>  
	</head>
	<body>
<?php

error_reporting(5);
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
include_once('../dbtools.inc.php');
include_once('../config.php');
$goods=$_POST['goods'];
// $goods=$_POST['gsn'];
	$field=$goods;
	       if($field!=""){
include_once('../config.php');	       	
	       	$sql="SELECT * FROM huishou WHERE username like '%$field%' OR huishouid like '%$field%' OR name like '%$field%' OR tel like '%$field%' OR address like '%$field%' OR goods_fenlei like '%$field%' OR pub_time like '%$field%'OR uemail like '%$field%'";
	       	$result = mysqli_query($config,$sql) or die ('SQL语句有误：'.mysqli_error($config));
	       }


// $field=$_GET['search'];
// 	       if($field!=""){
	       	// $sql="SELECT * FROM huishou WHERE `goods`='$goods'";
	       	// $result = mysqli_query($config,$sql) or die ('SQL语句有误：'.mysqli_error());
	       // }
	       // var_dump($sql);

	?>

		<form class="form-inline definewidth m20" action="back_hs_search.php" method="post" name="form_search">
			回收物品：<input name="goods" id="search" placeholder="搜索物品" class="abc input-default" value=""></input>&nbsp;&nbsp;
			<button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp;
		</form>
		<table class="table table-bordered table-hover definewidth m10">
		    <thead>
			    <tr>
			       <th>回收订单号</th>
			       <th>姓名</th>
			        <th>电话</th> 
			        <th>提交用户</th>
			        <th>用户邮箱</th>
			        <th>物品分类id</th>
			         <th>物品图片</th>
			        <th>收货地址</th>
			         <th>提交时间</th>
			     
			        <th style="text-align:center;">操作</th>
			    </tr>
		    </thead>


            <?php while ($ro=mysqli_fetch_array($result)){?>

		
			<tr>
				<td><?php echo $ro['huishouid'];?></td>
				<td><?php echo $ro['name'];?></td>
				<td><?php echo $ro['tel'];?></td>
				<td><?php echo $ro['username'];?></td>
				<td><?php echo $ro['uemail'];?></td>
				<td><?php echo $ro['goods_fenlei'];?></td>
				<td style="width:100px;height: 100px;"><img src="../images/huishou/<?php echo $ro['goods_fenlei'];?>/<?php echo $ro['picture'];?>" style="width: 100%;height: 100%;"></td>
				<td><?php echo $ro['address'];?></td>
				<td><?php echo $ro['pub_time'];?></td>
				
				<td style="text-align:center;">
						<a href="back_hs_delete.php?id=<?php echo $v['huishouid']?>" onclick="return confirm('是否已完成该单子？');">完成</a>&nbsp;

				</td>
			</tr>
			
			 <?php } ?>
		</table>
	</body>
</html>